/**
 * 模拟数据，用于开发阶段
 */

// 餐厅信息
export const shopInfo = {
  id: '1',
  name: '微餐饮示例店',
  logo: '/static/logo.png',
  address: '北京市朝阳区望京SOHO T1',
  phone: '010-88888888',
  businessHours: '10:00-22:00',
  announcement: '欢迎光临本店，用餐高峰期请提前下单。'
};

// 餐桌信息
export const tableInfo = {
  id: '101',
  name: '1号桌',
  area: '大厅',
  capacity: 4,
  status: 'idle', // idle: 空闲, using: 使用中
  qrCode: '/static/table_qrcode.png'
};

// 菜品分类
export const categories = [
  { id: '1', name: '热销推荐', icon: '/static/category/hot.png' },
  { id: '2', name: '特色主食', icon: '/static/category/main.png' },
  { id: '3', name: '精选小吃', icon: '/static/category/snack.png' },
  { id: '4', name: '时令蔬菜', icon: '/static/category/vegetable.png' },
  { id: '5', name: '汤品', icon: '/static/category/soup.png' },
  { id: '6', name: '酒水饮料', icon: '/static/category/drink.png' },
  { id: '7', name: '甜品', icon: '/static/category/dessert.png' }
];

// 菜品列表
export const dishes = [
  {
    id: '1',
    name: '回锅肉',
    price: 38.00,
    originalPrice: 42.00,
    categoryId: '1',
    sales: 1023,
    rating: 4.8,
    thumbnail: '/static/dishes/huiguorou.png',
    images: [
      '/static/dishes/huiguorou_1.png',
      '/static/dishes/huiguorou_2.png'
    ],
    description: '选用上等五花肉，传统川菜工艺，回香醇厚。',
    tags: ['招牌', '辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '2',
    name: '鱼香肉丝',
    price: 32.00,
    originalPrice: 36.00,
    categoryId: '1',
    sales: 876,
    rating: 4.9,
    thumbnail: '/static/dishes/yuxiangrousi.png',
    images: [
      '/static/dishes/yuxiangrousi_1.png',
      '/static/dishes/yuxiangrousi_2.png'
    ],
    description: '精选里脊肉，搭配鲜笋、木耳，口感酸甜开胃。',
    tags: ['经典', '微辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '3',
    name: '宫保鸡丁',
    price: 36.00,
    originalPrice: 40.00,
    categoryId: '1',
    sales: 765,
    rating: 4.7,
    thumbnail: '/static/dishes/gongbaojiding.png',
    images: [
      '/static/dishes/gongbaojiding_1.png',
      '/static/dishes/gongbaojiding_2.png'
    ],
    description: '选用嫩滑鸡胸肉，搭配花生、黄瓜丁，麻辣鲜香。',
    tags: ['经典', '辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '4',
    name: '小炒肉',
    price: 36.00,
    originalPrice: 36.00,
    categoryId: '1',
    sales: 684,
    rating: 4.6,
    thumbnail: '/static/dishes/xiaochaorou.png',
    images: [
      '/static/dishes/xiaochaorou_1.png',
      '/static/dishes/xiaochaorou_2.png'
    ],
    description: '农家小炒肉，五花肉爆炒青椒，香辣过瘾。',
    tags: ['下饭', '辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '5',
    name: '红烧排骨',
    price: 48.00,
    originalPrice: 52.00,
    categoryId: '1',
    sales: 634,
    rating: 4.9,
    thumbnail: '/static/dishes/hongshaopaigu.png',
    images: [
      '/static/dishes/hongshaopaigu_1.png',
      '/static/dishes/hongshaopaigu_2.png'
    ],
    description: '精选猪排骨，红烧入味，肉质酥烂。',
    tags: ['经典', '下饭'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '6',
    name: '麻婆豆腐',
    price: 28.00,
    originalPrice: 32.00,
    categoryId: '4',
    sales: 589,
    rating: 4.5,
    thumbnail: '/static/dishes/mapodoufu.png',
    images: [
      '/static/dishes/mapodoufu_1.png',
      '/static/dishes/mapodoufu_2.png'
    ],
    description: '嫩滑豆腐，搭配肉末，麻辣鲜香，口味正宗。',
    tags: ['素菜', '辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '7',
    name: '水煮肉片',
    price: 46.00,
    originalPrice: 46.00,
    categoryId: '1',
    sales: 521,
    rating: 4.8,
    thumbnail: '/static/dishes/shuizhuroupian.png',
    images: [
      '/static/dishes/shuizhuroupian_1.png',
      '/static/dishes/shuizhuroupian_2.png'
    ],
    description: '嫩滑牛肉片，汤底红亮，麻辣鲜香。',
    tags: ['招牌', '特辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '8',
    name: '蒜蓉空心菜',
    price: 22.00,
    originalPrice: 22.00,
    categoryId: '4',
    sales: 468,
    rating: 4.7,
    thumbnail: '/static/dishes/kongxincai.png',
    images: [
      '/static/dishes/kongxincai_1.png',
      '/static/dishes/kongxincai_2.png'
    ],
    description: '新鲜空心菜，爆炒蒜蓉，清脆爽口。',
    tags: ['素菜', '清淡'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '9',
    name: '麻辣香锅',
    price: 68.00,
    originalPrice: 68.00,
    categoryId: '2',
    sales: 436,
    rating: 4.9,
    thumbnail: '/static/dishes/malaxiangguo.png',
    images: [
      '/static/dishes/malaxiangguo_1.png',
      '/static/dishes/malaxiangguo_2.png'
    ],
    description: '选用多种食材，麻辣鲜香，百吃不厌。',
    tags: ['招牌', '微辣', '特辣'],
    specifications: ['小份', '中份', '大份'],
    stock: 100,
    unit: '份'
  },
  {
    id: '10',
    name: '米饭',
    price: 3.00,
    originalPrice: 3.00,
    categoryId: '2',
    sales: 2435,
    rating: 5.0,
    thumbnail: '/static/dishes/rice.png',
    images: [
      '/static/dishes/rice.png'
    ],
    description: '优质东北大米，香软可口。',
    tags: ['主食'],
    specifications: ['小碗', '大碗'],
    stock: 1000,
    unit: '碗'
  },
  {
    id: '11',
    name: '可乐',
    price: 6.00,
    originalPrice: 6.00,
    categoryId: '6',
    sales: 1562,
    rating: 5.0,
    thumbnail: '/static/dishes/cola.png',
    images: [
      '/static/dishes/cola.png'
    ],
    description: '百事可乐，清凉解渴。',
    tags: ['饮料'],
    specifications: ['330ml', '500ml'],
    stock: 1000,
    unit: '瓶'
  },
  {
    id: '12',
    name: '冰红茶',
    price: 6.00,
    originalPrice: 6.00,
    categoryId: '6',
    sales: 1245,
    rating: 5.0,
    thumbnail: '/static/dishes/icetea.png',
    images: [
      '/static/dishes/icetea.png'
    ],
    description: '醇香冰红茶，清新解腻。',
    tags: ['饮料'],
    specifications: ['330ml', '500ml'],
    stock: 1000,
    unit: '瓶'
  }
];

// 订单状态
export const orderStatus = {
  PENDING_PAYMENT: 'pending_payment', // 待支付
  PAID: 'paid', // 已支付
  COOKING: 'cooking', // 烹饪中
  COMPLETED: 'completed', // 已完成
  CANCELLED: 'cancelled' // 已取消
};

// 订单列表
export const orders = [
  {
    id: '20231001001',
    tableId: '101',
    totalAmount: 108.00,
    status: orderStatus.COMPLETED,
    createTime: '2023-10-01 12:30:25',
    payTime: '2023-10-01 12:32:18',
    completeTime: '2023-10-01 13:05:33',
    items: [
      { id: '1', name: '回锅肉', price: 38.00, quantity: 1 },
      { id: '2', name: '鱼香肉丝', price: 32.00, quantity: 1 },
      { id: '6', name: '麻婆豆腐', price: 28.00, quantity: 1 },
      { id: '10', name: '米饭', price: 3.00, quantity: 2 },
      { id: '11', name: '可乐', price: 6.00, quantity: 1 }
    ]
  },
  {
    id: '20231002001',
    tableId: '102',
    totalAmount: 171.00,
    status: orderStatus.PAID,
    createTime: '2023-10-02 18:15:42',
    payTime: '2023-10-02 18:17:35',
    items: [
      { id: '5', name: '红烧排骨', price: 48.00, quantity: 1 },
      { id: '7', name: '水煮肉片', price: 46.00, quantity: 1 },
      { id: '9', name: '麻辣香锅', price: 68.00, quantity: 1 },
      { id: '10', name: '米饭', price: 3.00, quantity: 3 }
    ]
  },
  {
    id: '20231003001',
    tableId: '103',
    totalAmount: 92.00,
    status: orderStatus.PENDING_PAYMENT,
    createTime: '2023-10-03 19:42:18',
    items: [
      { id: '2', name: '鱼香肉丝', price: 32.00, quantity: 1 },
      { id: '3', name: '宫保鸡丁', price: 36.00, quantity: 1 },
      { id: '8', name: '蒜蓉空心菜', price: 22.00, quantity: 1 },
      { id: '12', name: '冰红茶', price: 6.00, quantity: 2 }
    ]
  }
];

// 模拟API响应
export const mockApiResponse = (data, code = 0, msg = 'success') => {
  return {
    code,
    msg,
    data
  };
}; 